 #{extends 'frameHome.html' /} #{set title:'TopicIdeas' /}
 #{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">
#{/set}

<script type="text/javascript">
	$(document).ready(
			function() {
				$('.left, .content input, .content textarea, .content select')
						.focus(function() {
							$(this).parents('.row').addClass("over");
						}).blur(function() {
							$(this).parents('.row').removeClass("over");
						});
			});
</script>

<div id=right>

	<script type="text/javascript">
		function createTarget(t) {
			window.open("", t, "width=600,height=550");
			return true;
		}
	</script>

	<head>
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/main.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">

	</head>

	<div id=main>


		<div id="Topic-Ideas">
			<h1>Topic Ideas</h1>


			<form action="@{PostingIdea.selectAllTopicIdeas() }">
				#{if ideaList}#{list items:ideaList, as:'idea'} #{if idea.hide==false}
				<li>
			<a href="@{PostingIdea.ShowIdea(idea.id)}"><input type="checkbox" name="box" value=${idea}/>${idea.title}</a> .... Posted By: ${idea.author.name} <br/>
			
			
			</li>#{/if}#{/list}
			<a href="@{PostingIdea.Post(topic.id)}" class="pill button" >Post idea to Topic</a></br>
			
			
			#{if merger.email==topic.author.email || merger.email==topic.entity.organization.lead.email}
			#{if size>1}
			
			<input
			type="submit" value="Submit Merged Ideas"onclick="JavaScript:alert('are you sure you want to merge selected one??!')" />
			#{/if}
			
			#{/if}#{else}no permissions allowed for merging#{/else} #{/if}
			#{else} Sorry! This Topic has no Ideas
			<a href="@{PostingIdea.Post(topic.id)}" class="pill button" >Post idea to Topic</a></br>
			<a href="@{Topics.showTopic(topic.id)}" class="pill button" >Back to Topic</a></br>
			
			 #{/else}
			
			 
		</form>
			

		</div>
	</div>